package cn.wolfcode.mapper;

import cn.wolfcode.domain.Department;
import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> selectForList(QueryObject qo);

    void insertByEmpIdAndRoleId(@Param("id") Long id, @Param("rid") Long rid);

    void deleteByEmpId(Long id);

    Employee selectByUsernameAndPassword(@Param("name") String name, @Param("password") String password);

    Employee selectByOldPasswordAndId(@Param("oldPassword") String oldPassword, @Param("id") Long id);

    void updateByNewPassword(@Param("newPassword") String newPassword, @Param("id") Long id);

    Employee selectByName(String name);

    List<Employee> selectByRoleSn(String... sns);
}